home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet internetowy / Przegladarki internetowe / Mozilla Seamonkey 1.0.5 pl / seamonkey-1.0.5.pl-PL.win32.installer.exe / MAIL.XPI / install.js
Encoding:
JavaScript  |  2006-09-14  |  21.6 KB  |  572 lines

  1. // this function verifies disk space in kilobytes
  2. function verifyDiskSpace(dirPath, spaceRequired)
  3. {
  4.   var spaceAvailable;
  5.  
  6.   // Get the available disk space on the given path
  7.   spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
  8.  
  9.   // Convert the available disk space into kilobytes
  10.   spaceAvailable = parseInt(spaceAvailable / 1024);
  11.  
  12.   // do the verification
  13.   if(spaceAvailable < spaceRequired)
  14.   {
  15.     logComment("Insufficient disk space: " + dirPath);
  16.     logComment("  required : " + spaceRequired + " K");
  17.     logComment("  available: " + spaceAvailable + " K");
  18.     return(false);
  19.   }
  20.  
  21.   return(true);
  22. }
  23.  
  24. // this function deletes a file if it exists
  25. function deleteThisFile(dirKey, file)
  26. {
  27.   var fFileToDelete;
  28.  
  29.   fFileToDelete = getFolder(dirKey, file);
  30.   logComment("File to delete: " + fFileToDelete);
  31.   if(File.isFile(fFileToDelete))
  32.   {
  33.     File.remove(fFileToDelete);
  34.     return(true);
  35.   }
  36.   else
  37.     return(false);
  38. }
  39.  
  40. // this function deletes a folder if it exists
  41. function deleteThisFolder(dirKey, folder, recursiveDelete)
  42. {
  43.   var fToDelete;
  44.  
  45.   if(typeof recursiveDelete == "undefined")
  46.     recursiveDelete = true;
  47.  
  48.   fToDelete = getFolder(dirKey, folder);
  49.   logComment("folder to delete: " + fToDelete);
  50.   if(File.isDirectory(fToDelete))
  51.   {
  52.     File.dirRemove(fToDelete, recursiveDelete);
  53.     return(true);
  54.   }
  55.   else
  56.     return(false);
  57. }
  58.  
  59. // OS type detection
  60. // which platform?
  61. function getPlatform()
  62. {
  63.   var platformStr;
  64.   var platformNode;
  65.  
  66.   if('platform' in Install)
  67.   {
  68.     platformStr = new String(Install.platform);
  69.  
  70.     if (!platformStr.search(/^Macintosh/))
  71.       platformNode = 'mac';
  72.     else if (!platformStr.search(/^Win/))
  73.       platformNode = 'win';
  74.     else if (!platformStr.search(/^OS\/2/))
  75.       platformNode = 'win';
  76.     else
  77.       platformNode = 'unix';
  78.   }
  79.   else
  80.   {
  81.     var fOSMac  = getFolder("Mac System");
  82.     var fOSWin  = getFolder("Win System");
  83.  
  84.     logComment("fOSMac: "  + fOSMac);
  85.     logComment("fOSWin: "  + fOSWin);
  86.  
  87.     if(fOSMac != null)
  88.       platformNode = 'mac';
  89.     else if(fOSWin != null)
  90.       platformNode = 'win';
  91.     else
  92.       platformNode = 'unix';
  93.   }
  94.  
  95.   return platformNode;
  96. }
  97.  
  98. function IsWinnt()
  99. {
  100.   /* Determines if the script is running under NT or not.
  101.    *
  102.    */
  103.   var winreg = getWinRegistry();
  104.   var subkey;
  105.   var szCurrentVersion;
  106.  
  107.   winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  108.   subkey              = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
  109.   szCurrentVersion    = winreg.getValueString(subkey, "CurrentVersion");
  110.   logComment("szCurrentVersion: " + szCurrentVersion);
  111.   if((szCurrentVersion == "") || (szCurrentVersion == null))
  112.   {
  113.     return false;
  114.   }
  115.   else
  116.   {
  117.     return true;
  118.   }
  119. }
  120.  
  121. function registerProgramFolderKey(winreg, fFolderPath)
  122. {
  123.   var subkey;
  124.   var err;
  125.  
  126.   /* set the Program Folder Path in the Mozilla key in the Windows Registry */
  127.   winreg.createKey("SOFTWARE\\mozilla.org", "");
  128.  
  129.   subkey  = "SOFTWARE\\mozilla.org\\SeaMonkey";
  130.   winreg.createKey(subkey,"");
  131.   err     = winreg.setValueString(subkey, "CurrentVersion", "1.0.5 (pl)");
  132.  
  133.   subkey  = "SOFTWARE\\mozilla.org\\SeaMonkey\\1.0.5 (pl)";
  134.   winreg.createKey(subkey,"");
  135.  
  136.   subkey  = "SOFTWARE\\mozilla.org\\SeaMonkey\\1.0.5 (pl)\\Main";
  137.   winreg.createKey(subkey,"");
  138.   err     = winreg.setValueString(subkey, "Program Folder Path", fFolderPath);
  139. }
  140.  
  141. function createShortcuts() 
  142. {
  143.   var subkey;
  144.   var szStartMenuPrograms;
  145.   var szStartMenu;
  146.   var szFolderDesktop;
  147.   var szFolderQuickLaunch;
  148.   var szFolderSendTo;
  149.   var szFolderAppData;
  150.   var winreg;
  151.   var fWindows;
  152.   var fTemp;
  153.   var fProgram;
  154.   var fileExe;
  155.   var scExeDesc;
  156.   var scProfileDesc;
  157.   var scProfileDescParam;
  158.   var scFolderName;
  159.   var fFolderDesktop;
  160.   var fFolderPath;
  161.   var fFolderPathStr;
  162.   var fFolderQuickLaunch;
  163.   var is_winnt;
  164.   var szCurrentVersion;
  165.   var restrictedAccess;
  166.   var ikwDefined;
  167.   var folderQuickLaunchExists;
  168.   var filePalmSyncInstallExe;
  169.   var scDescPalmSyncInstall;
  170.   var scDescPalmSyncUninstall;
  171.   var folderPalmSyncName;
  172.  
  173.   winreg                    = getWinRegistry();
  174.   fWindows                  = getFolder("Windows");
  175.   fProgram                  = getFolder("Program");
  176.   fileExe                   = getFolder("Program", "SeaMonkey.exe");
  177.   filePalmSyncInstallExe    = getFolder("Program", "PalmSyncInstall.exe");
  178.   scDescPalmSyncInstall     = "Intalator synchronizatora Ksi\u105c\u017cki adresowej z Palm";
  179.   scDescPalmSyncUninstall   = "Deinstalator synchronizatora Ksi\u105c\u017cki adresowej z Palm";
  180.   filePalmSyncReadme        = getFolder("Program", "palm.html");
  181.   scDescPalmSyncReadme      = "Przwodnik synchronizacji z Palm";
  182.   fileMailIcon              = getFolder("Chrome", "icons/default/messengerWindow.ico");
  183.   scExeDesc                 = "Kurier Poczty";
  184.   scParam                   = "-mail";
  185.   scFolderName              = "SeaMonkey";
  186.   folderPalmSyncName        = "Narz\u0119dzia Palm";
  187.   if(winreg != null) 
  188.   {
  189.     /* This will check to see if the user has restricted access or not.
  190.      * It checks to see if HKEY_LOCALMACHINE\SOFTWARE is writable.  If
  191.      * it is, then access is not restricted.  This is only used to
  192.      * determine which Desktop, Programs, and Start Menu folders
  193.      * are to used: common or per user
  194.      */
  195.     restrictedAccess = false;
  196.     ikwDefined = typeof(winreg.isKeyWritable);
  197.     logComment("winreg.isKeyWritable(): " + ikwDefined);
  198.     if(ikwDefined == "function")
  199.     {
  200.       winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  201.       if(!winreg.isKeyWritable("SOFTWARE"))
  202.         restrictedAccess = true;
  203.     }
  204.  
  205.     /* determine if the script is running under NT or not */
  206.     winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  207.     subkey              = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
  208.     szCurrentVersion    = winreg.getValueString(subkey, "CurrentVersion");
  209.     logComment("szCurrentVersion: " + szCurrentVersion);
  210.     if((szCurrentVersion == "") || (szCurrentVersion == null))
  211.     {
  212.       is_winnt = false;
  213.     }
  214.     else
  215.     {
  216.       is_winnt = true;
  217.     }
  218.  
  219.     logComment("is_winnt value: " + is_winnt);
  220.     logComment("restrictedAccess value: " + restrictedAccess);
  221.     if(!is_winnt || restrictedAccess)
  222.     {
  223.       winreg.setRootKey(winreg.HKEY_CURRENT_USER);
  224.       subkey              = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
  225.       szStartMenuPrograms = winreg.getValueString(subkey, "Programs");
  226.       szStartMenu         = winreg.getValueString(subkey, "Start Menu");
  227.       szFolderDesktop     = winreg.getValueString(subkey, "Desktop");
  228.     }
  229.     else
  230.     {
  231.       winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  232.       subkey              = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
  233.       szStartMenuPrograms = winreg.getValueString(subkey, "Common Programs");
  234.       szStartMenu         = winreg.getValueString(subkey, "Common Start Menu");
  235.       szFolderDesktop     = winreg.getValueString(subkey, "Common Desktop");
  236.     }
  237.  
  238.     winreg.setRootKey(winreg.HKEY_CURRENT_USER);
  239.     subkey              = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
  240.     szFolderSendTo      = winreg.getValueString(subkey, "SendTo");
  241.  
  242.     subkey              = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
  243.     szFolderAppData     = winreg.getValueString(subkey, "AppData");
  244.  
  245.     // locate the Quick Launch folder
  246.     szFolderQuickLaunch     = szFolderAppData + "\\Microsoft\\Internet Explorer\\Quick Launch";
  247.     fFolderQuickLaunch      = getFolder("file:///", szFolderQuickLaunch);
  248.     folderQuickLaunchExists = File.isDirectory(fFolderQuickLaunch);
  249.     if(!folderQuickLaunchExists)
  250.     {
  251.       subkey                  = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\GrpConv\\MapGroups";
  252.       szFolderQuickLaunch     = winreg.getValueString(subkey, "Quick Launch");
  253.       folderQuickLaunchExists = File.isDirectory(fFolderPath);
  254.       if(folderQuickLaunchExists)
  255.         fFolderQuickLaunch = getFolder("file:///", szFolderQuickLaunch);
  256.     }
  257.     logComment("folderQuickLaunchExists: " + folderQuickLaunchExists);
  258.  
  259.     subkey              = "SOFTWARE\\mozilla.org\\SeaMonkey\\1.0.5 (pl)\\Main";
  260.     fFolderPathStr      = winreg.getValueString(subkey, "Program Folder Path");
  261.     if((fFolderPathStr == "") || (fFolderPathStr == null))
  262.     {
  263.       fTemp       = szStartMenuPrograms + "\\" + scFolderName;
  264.       fFolderPath = getFolder("file:///", fTemp);
  265.     }
  266.     else
  267.     {
  268.       /* convert the path string to a path folder object */
  269.       fFolderPath = getFolder("file:///", fFolderPathStr);
  270.     }
  271.     /* convert the path string to a path folder object */
  272.     fFolderDesktop = getFolder("file:///", szFolderDesktop);
  273.  
  274.     logComment("Folder StartMenuPrograms: " + szStartMenuPrograms);
  275.     logComment("Folder StartMenu        : " + szStartMenu);
  276.     logComment("Folder FolderDesktop    : " + szFolderDesktop);
  277.     logComment("Folder FolderSendTo     : " + szFolderSendTo);
  278.     logComment("Folder FolderQuickLaunch: " + szFolderQuickLaunch);
  279.     logComment("fileExe                 : " + fileExe);
  280.     logComment("fFolderPath             : " + fFolderPath);
  281.     logComment("scExeDesc               : " + scExeDesc);
  282.     logComment("fProgram                : " + fProgram);
  283.  
  284.     /* explicitly create the fFolderPath even though the windowsShortcut function creates the folder.
  285.      * This is so that the folder creation gets logged for uninstall to remove it. */
  286.     if(!File.exists(fFolderPath))
  287.       File.dirCreate(fFolderPath);
  288.  
  289.     /* create the shortcuts */
  290.     File.windowsShortcut(fileExe, fFolderPath, scExeDesc, fProgram, scParam, fileMailIcon, 0);
  291.  
  292.     // only create these two shortcuts if the files exist
  293.     if(File.exists(filePalmSyncInstallExe))
  294.     {
  295.       /* build the path to the sub folder to Palm Sync files */
  296.       var fStartMenuPalmSync = getFolder("file:///", fFolderPath + "/" + folderPalmSyncName);
  297.       if(!File.exists(fStartMenuPalmSync))
  298.         File.dirCreate(fStartMenuPalmSync);
  299.  
  300.       /* clean up the shortcuts in the old place */
  301.       deleteThisFile("file:///", fFolderPath + "/" + scDescPalmSyncInstall);
  302.       deleteThisFile("file:///", fFolderPath + "/" + scDescPalmSyncUninstall);
  303.  
  304.       /* create the shortcuts in the new sub folder */
  305.       File.windowsShortcut(filePalmSyncInstallExe, fStartMenuPalmSync, scDescPalmSyncInstall, fProgram, "", filePalmSyncInstallExe, 0);
  306.       File.windowsShortcut(filePalmSyncInstallExe, fStartMenuPalmSync, scDescPalmSyncUninstall, fProgram, "/u", filePalmSyncInstallExe, 1);
  307.  
  308.       // only create the palm sync readme shortcut if the file exist
  309.       if(File.exists(filePalmSyncReadme))
  310.       {
  311.         /* create the shortcuts in the new sub folder */
  312.         File.windowsShortcut(filePalmSyncReadme, fStartMenuPalmSync, scDescPalmSyncReadme, fProgram, "", filePalmSyncReadme, 0);
  313.       }
  314.     }
  315.  
  316.     //
  317.     // Disabled for now because mail does not have a different shortcut icon from Mozilla
  318.     //
  319.     //// create shortcut in the Quick Launch folder
  320.     //if(folderQuickLaunchExists)
  321.     //  File.windowsShortcut(fileExe, fFolderQuickLaunch, scExeDesc, fProgram,  "", fileExe, 0);
  322.  
  323.     if(!restrictedAccess)
  324.     {
  325.       winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  326.       registerProgramFolderKey(winreg, fFolderPath);
  327.     }
  328.  
  329.     winreg.setRootKey(winreg.HKEY_CURRENT_USER);
  330.     registerProgramFolderKey(winreg, fFolderPath);
  331.  
  332.     // Register as a windows XP mail application
  333.     if( IsWinnt() )
  334.     {
  335.       subkey = "Software\\Clients\\Mail\\SeaMonkey";
  336.       winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  337.  
  338.       winreg.createKey(subkey,"");
  339.       winreg.createKey(subkey + "\\DefaultIcon", "");
  340.       winreg.createKey(subkey + "\\shell", "");
  341.       winreg.createKey(subkey + "\\shell\\open", "");
  342.       winreg.createKey(subkey + "\\shell\\open\\command", "");
  343.       winreg.createKey(subkey + "\\InstallInfo","");
  344.  
  345.       winreg.setValueString(subkey, "", "SeaMonkey Mail");
  346.  
  347.       // path does not need to be quoted per MS doc
  348.       data = fProgram + "chrome\\icons\\default\\messengerWindow.ico,0";
  349.       winreg.setValueString(subkey + "\\DefaultIcon", "", data);
  350.  
  351.       data = "\"" + fProgram + "SeaMonkey.exe\" -mail";
  352.       winreg.setValueString(subkey + "\\shell\\open\\command", "", data);
  353.  
  354.       data = "\"" + fProgram + "uninstall\\SeaMonkeyUninstall.exe\" /ua \"1.0.5 (pl)\" /hs mail";
  355.       winreg.setValueString(subkey + "\\InstallInfo", "HideIconsCommand", data);
  356.  
  357.       // set this value to 0 because we're not creating the mail shortcuts yet.
  358.       winreg.setValueNumber(subkey + "\\InstallInfo", "IconsVisible", 0);
  359.  
  360.       data = "\"" + fProgram + "SeaMonkey.exe\" -silent -nosplash -setDefaultMail";
  361.       winreg.setValueString(subkey + "\\InstallInfo", "ReinstallCommand", data);
  362.  
  363.       data = "\"" + fProgram + "uninstall\\SeaMonkeyUninstall.exe\" /ua \"1.0.5 (pl)\" /ss mail";
  364.       winreg.setValueString(subkey + "\\InstallInfo", "ShowIconsCommand", data);
  365.     }
  366.   }
  367.   else
  368.   {
  369.     logComment("winreg is null");
  370.   }
  371. }
  372.  
  373. function updateMapi()
  374. {
  375.   var winreg;
  376.   var szValue;
  377.   var szMapiBackupDll;
  378.   var szDefaultMailClient;
  379.   var programMozMapi32File;
  380.   var mainExePath;
  381.   var sfpProgramMozMapi32File;
  382.   var sfpMainExePath;
  383.   var winsysMapi32File;
  384.   var mapiProxyFile;
  385.   var subkey;
  386.   var mailDefaultDescription = "SeaMonkey Mail";
  387.  
  388.   winreg = getWinRegistry();
  389.   if(winreg != null) 
  390.   {
  391.     mainExePath = getFolder("Program", "SeaMonkey.exe");
  392.     programMozMapi32File = getFolder("Program", "mozMapi32.dll");
  393.     winsysMapi32File = getFolder("Win System", "Mapi32.dll");
  394.     winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  395.  
  396.     // If Mapi_backup_dll *and* the default var of
  397.     // HKEY_LOCAL_MACHINE\Software\Clients\Mail is set, then install
  398.     // mozMapi32.dll to the windows system dir as Mapi32.dll.
  399.     szMapiBackupDll = winreg.getValueString("SOFTWARE\\Mozilla\\Desktop", "Mapi_backup_dll");
  400.     szDefaultMailClient = winreg.getValueString("SOFTWARE\\Clients\\Mail", "");
  401.     logComment("szMapiBackupDll: " + szMapiBackupDll);
  402.     logComment("szDefaultMailClient: " + szDefaultMailClient);
  403.     if((szMapiBackupDll != null) && (szMapiBackupDll != "") &&
  404.        (szDefaultMailClient != null) && (szDefaultMailClient == "SeaMonkey"))
  405.     {
  406.       // We do not want to log this file to be uninstalled because the
  407.       // uninstaller already has a special way to deal with restoring the
  408.       // appropriate previous Mapi32.dll.
  409.       addFile("",
  410.               "1.0.5.2006091003",
  411.               "bin/mozMapi32.dll",           // file name in jar to extract 
  412.               getFolder("Win System"),       // Where to put this file (Returned from getFolder) 
  413.               "Mapi32.dll",                  // new name when installed
  414.               DO_NOT_UNINSTALL);
  415.     }
  416.  
  417.     sfpProgramMozMapi32File = File.windowsGetShortName(programMozMapi32File);
  418.     sfpMainExePath = File.windowsGetShortName(mainExePath);
  419.  
  420.     subkey  = "SOFTWARE\\Clients\\Mail\\SeaMonkey";
  421.     winreg.createKey(subkey, "");
  422.     winreg.setValueString(subkey, "", mailDefaultDescription);
  423.     winreg.setValueString(subkey, "DLLPath", sfpProgramMozMapi32File);
  424.  
  425.     winreg.createKey(subkey      + "\\DefaultIcon", "");
  426.     winreg.setValueString(subkey + "\\DefaultIcon", "", sfpMainExePath + ",0");
  427.  
  428.     winreg.createKey(subkey      + "\\protocols", "");
  429.     winreg.createKey(subkey      + "\\protocols\\mailto", "");
  430.     winreg.setValueString(subkey + "\\protocols\\mailto", "", "URL:MailTo Protocol");
  431.  
  432.     winreg.createKey(subkey      + "\\protocols\\mailto\\shell", "");
  433.     winreg.createKey(subkey      + "\\protocols\\mailto\\shell\\open", "");
  434.     winreg.createKey(subkey      + "\\protocols\\mailto\\shell\\open\\command", "");
  435.     winreg.setValueString(subkey + "\\protocols\\mailto\\shell\\open\\command", "", sfpMainExePath + " \"%1\"");
  436.  
  437.     winreg.createKey(subkey      + "\\shell", "");
  438.     winreg.createKey(subkey      + "\\shell\\open", "");
  439.     winreg.createKey(subkey      + "\\shell\\open\\command", "");
  440.     winreg.setValueString(subkey + "\\shell\\open\\command", "", sfpMainExePath + " -mail");
  441.  
  442.     // Register MapiProxy.dll
  443.     mapiProxyFile = getFolder("Program", "MapiProxy.dll");
  444.     err = File.windowsRegisterServer(mapiProxyFile);
  445.     logComment("File.windowsRegisterServer(" + mapiProxyFile + ") returned: " + err);
  446.   }
  447. }
  448.  
  449. function upgradeCleanup()
  450. {
  451.   // Obsolete files from Netscape 6.0 and Netscape 6.01 that
  452.   // need to be cleaned up.
  453.   deleteThisFile("Program",    "msgMapi.dll");
  454.   deleteThisFile("Components", "signed.dll");
  455.   deleteThisFile("Components", "smimestb.dll");
  456.   deleteThisFile("Components", "nsMapiRegistry.dll");
  457.   deleteThisFile("Components", "absyncsv.dll");
  458. }
  459.  
  460. function updateWinIni()
  461. {
  462.   var fWinIni  = getWinProfile(getFolder("Windows"), "win.ini");
  463.   if(fWinIni != null)
  464.   {
  465.     fWinIni.writeString("Mail", "MAPI", "1");
  466.     fWinIni.writeString("Mail", "MAPIX", "1");
  467.   }
  468. }
  469.  
  470. // main
  471. var srDest;
  472. var err;
  473. var fProgram;
  474.  
  475. srDest = 6081;
  476. err    = initInstall("SeaMonkey Mail", "Mail", "1.0.5.2006091003"); 
  477. logComment("initInstall: " + err);
  478.  
  479. fProgram = getFolder("Program");
  480. logComment("fProgram: " + fProgram);
  481.  
  482. if(verifyDiskSpace(fProgram, srDest))
  483. {
  484.   setPackageFolder(fProgram);
  485.  
  486.   upgradeCleanup();
  487.   err = addDirectory("",
  488.                      "1.0.5.2006091003",
  489.                      "bin",              // dir name in jar to extract 
  490.                      fProgram,           // Where to put this file (Returned from GetFolder) 
  491.                      "",                 // subdir name to create relative to fProgram
  492.                      true);              // Force Flag 
  493.   logComment("addDirectory() returned: " + err);
  494.  
  495.   // check return value
  496.   if( err == SUCCESS )
  497.   {
  498.     createShortcuts();
  499.     updateWinIni();
  500.     updateMapi();
  501.  
  502.     // we don't want to fail on errors for the above
  503.     resetError();
  504.  
  505.     // register chrome
  506.     registerChrome(CONTENT | DELAYED_CHROME, 
  507.                    getFolder("Chrome","messenger.jar"),
  508.                    "content/messenger/");
  509.     registerChrome(CONTENT | DELAYED_CHROME,
  510.                    getFolder("Chrome","messenger.jar"),
  511.                    "content/messenger-region/");
  512.     registerChrome(CONTENT | DELAYED_CHROME,
  513.                    getFolder("Chrome","messenger.jar"),
  514.                    "content/messenger-smime/");
  515.     registerChrome(CONTENT | DELAYED_CHROME,
  516.                    getFolder("Chrome","messenger.jar"),
  517.                    "content/messenger-mdn/");
  518.     registerChrome(CONTENT | DELAYED_CHROME,
  519.                    getFolder("Chrome","messenger.jar"),
  520.                    "content/messenger-views/");
  521.     registerChrome(CONTENT | DELAYED_CHROME,
  522.                    getFolder("Chrome","messenger.jar"),
  523.                    "content/messenger-mapi/");
  524.  
  525.     // log comments for uninstalling the registry keys created by mail for setting
  526.     // itself up in WinXP's Start menu
  527.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey []");
  528.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey []");
  529.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey [DLLPath]");
  530.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\DefaultIcon []");
  531.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\DefaultIcon []");
  532.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\protocols []");
  533.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\protocols\\mailto []");
  534.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\protocols\\mailto []");
  535.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\protocols\\mailto\\shell []");
  536.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\protocols\\mailto\\shell\\open []");
  537.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\protocols\\mailto\\shell\\open\\command []");
  538.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\protocols\\mailto\\shell\\open\\command []");
  539.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\shell []");
  540.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\shell\\open []");
  541.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\shell\\open\\command []");
  542.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\SeaMonkey\\shell\\open\\command []");
  543.  
  544.     // check return value
  545.     err = getLastError();
  546.     if(err == SUCCESS)
  547.     {
  548.       err = performInstall(); 
  549.       logComment("performInstall() returned: " + err);
  550.  
  551.       // Commenting this out for now until bug 182423 is fixed. This will at least prevent
  552.       // people who have not run PalmSyncInstall.exe to run into bug 182423.  However,
  553.       // if they run the PalmSync uninstall by hand via the Start menu, then they will
  554.       // still run into the bug.
  555.       //if(err == SUCCESS)
  556.       //{
  557.       //  // Log the uninstall command to run PalmSyncInstall.exe to uninstall itself.
  558.       //  // This needs to be logged after all the files have been installed.
  559.       //  logComment("Uninstall Command: \"" + fProgram + "PalmSyncInstall.exe\" /us");
  560.       //}
  561.     }
  562.     else
  563.       cancelInstall(err);
  564.   }
  565.   else
  566.     cancelInstall(err);
  567. }
  568. else
  569.   cancelInstall(INSUFFICIENT_DISK_SPACE);
  570.  
  571. // end main
  572.